package com.ruoyi.mixuebingcheng.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单状态业务对象 orders
 *
 * @author ruoyi
 * @date 2023-10-27
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class OrdersBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 订单状态 1待付款，2待派送，3已派送，4已完成
     */
    @NotNull(message = "订单状态 1待付款，2待派送，3已派送，4已完成不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long status;

    /**
     * 订单号
     */
    @NotBlank(message = "订单号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderNumber;

    /**
     * 结账时间
     */
    @NotNull(message = "结账时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date checkoutTime;

    /**
     * 实收金额
     */
    @NotNull(message = "实收金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal amount;

    /**
     * 优惠券id
     */
    @NotNull(message = "优惠券id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long couponId;

    /**
     * 用户id
     */
    @NotNull(message = "用户id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;


}
